<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <form action="">
    <input type="text" name="email">
    <input type="text" name="password">
    <input type="submit">
  </form>
  <div></div>
  <script src="../libs/jquery-1.12.4.js"></script>
  <script src="./jquery-validation-1.14.0/dist/jquery.validate.js"></script>
  <script>
    $(function () {
      $('form').validate({
        errorClass: 'mineClassName',
        errorLabelContainer: 'div',
        rules: {
          email: {
            required: true,
            email: true
          },
          password: {
            required: true
          }
        },
        messages: {
          email: {
            required: '请输入邮箱',
            email: '请输入正确的邮箱格式'
          },
          password: {
            required: '请输入密码'
          }
        }
      })
    })
  </script>
</body>
</html>